package com.ling.pl.autoproject.definition.component.grid.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

public class Grid {
    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String entityId;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "名称")
    String name;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "代码")
    String code;

    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "默认数据集合")
    String defaultDatasetId;

    @Column(name = "DEFAULT_BACK_PROCESSOR_ID", length = 250)
    @ModelProperty(comment = "默认后台处理对象")
    String defaultBackProcessorId;

    @Column(name = "FORE_PLUGIN", length = 250)
    @ModelProperty(comment = "前端应用插件")
    String forePlugin;

    @Column(name = "COMPONENT_MSG", length = 250)
    @ModelProperty(comment = "部件消息")
    String componentMsg;

    //显示设置
    @Column(name = "IS_TAB")
    @ModelProperty(comment = "适应屏宽")
    Boolean isFullView;

    @Column(name = "IS_TAB")
    @ModelProperty(comment = "适应屏宽")
    Boolean isHeader;

    @Column(name = "TAB_POSITION", length = 150)
    @ModelProperty(comment = "表格样式")
    @Dict(code = "builder.component.tableType", des = "树表格,分组表格")
    String tableType;

    @Column(name = "NULL_TEXT", length = 150)
    @ModelProperty(comment = "无值内容")
    String nullText;

    @Column(name = "NULL_TEXT_LANG", length = 150)
    @ModelProperty(comment = "无值内容语言资源")
    String nullTextI18n;

    //分页及排序
    @Column(name = "IS_TAB")
    @ModelProperty(comment = "启用分页")
    Boolean isPage;

    @Column(name = "PAGESIZE")
    @ModelProperty(comment = "默认分页大小")
    Integer pageSize;

    @Column(name = "IS_TAB")
    @ModelProperty(comment = "禁用排序")
    Boolean isSort;

    @Column(name = "NULL_TEXT", length = 150)
    @ModelProperty(comment = "默认排序属性")
    String defaultSortProperty;

    @Column(name = "NULL_TEXT", length = 150)
    @ModelProperty(comment = "默认排序方向")
    @Dict(code = "builder.entity.sortDirection", des = "升序,降序")
    String defaultSortDirection;

    //表格逻辑 忽略默认数据项
    @Column(name = "IS_TAB")
    @ModelProperty(comment = "外键属性")
    Boolean isForeignKey;

    @Column(name = "IS_TAB")
    @ModelProperty(comment = "行数据操作标识")
    Boolean isRowKey;

    //树表格设置
    @Column(name = "NULL_TEXT_LANG", length = 150)
    @ModelProperty(comment = "树表父数据属性")
    String parentProperty;

    @Column(name = "REQUIREMENT_ID", length = 36)
    @ModelProperty(comment = "系统设计需求id")
    String requirementId;

    @Column(name = "TODO", length = 500)
    @ModelProperty(comment = "todo")
    String todo;
}
